<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" >
    <div class="content">
        <div class="panel panel-default panel-intro">

            <div class="panel-body">
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade active in" id="one">
                        <div class="widget-body no-padding">

                            <div class="bootstrap-table">
                                <div class="commonsearch-table ">
                                    <fieldset>
                                        <div class="row">
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="operator" >&nbsp;&nbsp;&nbsp;&nbsp;编号 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$row.number}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="operator" >&nbsp;&nbsp;&nbsp;&nbsp;时间 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{:date('Y-m-d',$row['createtime'])}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="operator" >&nbsp;&nbsp;&nbsp;&nbsp;供货商 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$srow['nickname']}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="operator" >&nbsp;&nbsp;&nbsp;&nbsp;经手人 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$row['operator']}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="operator" >&nbsp;&nbsp;&nbsp;&nbsp;部门单位 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$row['company']}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="入库仓库" >&nbsp;&nbsp;&nbsp;&nbsp;部门单位 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$hrow['name']}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="入库仓库" >&nbsp;&nbsp;&nbsp;&nbsp;说明 : </label>
                                                <div class="" style="float: left">
                                                    <span class="">{$row['explain']}</span>
                                                </div>
                                            </div>
                                            <div class="" style="float: left;width:25%">
                                                <label  style="float: left" for="入库仓库" >&nbsp;&nbsp;&nbsp;&nbsp;运费 : </label>
                                                <div class="" style="float: left">
                                                    <input type="text" class="form-control" name="allfare" value="{$row['allfare']}" placeholder="运费" id="allfare" data-index="14" style="display: none">
                                                    <span class="">{$row['allfare']}</span>
                                                </div>
                                            </div>
                                        </div>
                                </fieldset>
                                </div>
                            </div>
<!--                            <div class="fixed-table-toolbar"><div class="bs-bars pull-left"><div id="toolbar" class="toolbar" style="position: relative;">-->
<!--                                <a href="javascript:;" class="btn btn-success btn-add " title="添加"><i class="fa fa-plus"></i> 添加</a>-->
<!--                            </div>-->
                            </div>
                        <div class="columns-right pull-right" style="margin-top:10px;margin-bottom:10px;">
                            </div>
                                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"  data-operate-edit="1" data-operate-del="1" width="auto">
                                    <thead>
                                    <tr>
                                        <th style="text-align: center; vertical-align: middle; " data-field="id">
                                            <div class="th-inner ">Id</div>
                                            <div class="fht-cell">

                                            </div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="createtime">
                                            <div class="th-inner ">商品编号</div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="number"><div class="th-inner ">商品名称</div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="status">
                                            <div class="th-inner ">产地</div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="supplier_id">
                                            <div class="th-inner ">规格</div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="operator">
                                            <div class="th-inner ">账面库存</div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="company">
                                            <div class="th-inner ">虚拟库存
                                            </div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="order_goods_total"><div class="th-inner ">入库数量</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="arrival_total"><div class="th-inner ">单位</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="order_price"><div class="th-inner ">单价</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="arrival_price"><div class="th-inner ">税点</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="order_price"><div class="th-inner ">金额</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="paid_in_price"><div class="th-inner ">含税单价</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="paid_in_price"><div class="th-inner ">税额</div><div class="fht-cell"></div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="explain"><div class="th-inner ">税费合计</div><div class="fht-cell"></div></th>
                                        <!--                                                <th style="text-align: center; vertical-align: middle; " data-field="abstract"><div class="th-inner ">已收获数量</div><div class="fht-cell"></div></th>-->
                                        <th style="text-align: center; vertical-align: middle; " data-field="operate"><div class="th-inner ">备注</div><div class="fht-cell"></div></th>
<!--                                        <th style="text-align: center; vertical-align: middle; " data-field="operate"><div class="th-inner ">操作</div><div class="fht-cell"></div></th>-->
                                    </tr>
                                    </thead>
                                    <tbody data-listidx="0" class="connnn">
                                            {volist name="list" id="vo"}
                                                    <tr data-index="0">
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            {$vo.id}
                                                            <input type="hidden" name="row[{$vo.id}][goods_id]" value="{$vo.id}">
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.number}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.title}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.place_origin}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.specs}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.stock}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.xstock}</td>
                                                        <td style="text-align: center; vertical-align: middle; " class="xxgg" >
                                                            <input type="text" onkeyup="onlynumber(this);"  class="requisition_num goods_num" name="row[{$vo.id}][goods_num]" value="{$vo.goods_num}" style="display: none">
                                                            <span>{$vo.goods_num}</span>
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.unit}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            <input type="text" class="form-control" style="display: none" value="{$vo.unit_price}" name="row[{$vo.id}][unit_price]" onkeyup="checkInputIntFloat(this);">
                                                            <span class=" price">{$vo.unit_price}</span>
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            <input type="text" class="form-control" style="display: none" value="{$vo.tax}" name="row[{$vo.id}][tax]">
                                                            <span class="tax ">{$vo.tax}</span>
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; " class="allprice">
                                                            0
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            <input type="text" class="form-control ht_prices" style="display: none" value="{$vo.ht_price}" name="row[{$vo.id}][ht_price]">
                                                            <span class="ht_price">{$vo.ht_price}</span>
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; " class="taxall">0</td>
                                                        <td style="text-align: center; vertical-align: middle; " class="count sfhj">{$vo.ht_price*$vo.goods_num}</td>
                                                        <td style="text-align: center; vertical-align: middle; ">{$vo.remark}</td>
                                                     </tr>
                                            {/volist}
                                    </tbody>

                                    <tbody class="tbfoot" data-listidx="0" >
                                        <td style="text-align: center; vertical-align: middle; ">合计</td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; " class="zstock"></td>
                                        <td style="text-align: center; vertical-align: middle; " class="xstock"></td>
                                        <td style="text-align: center; vertical-align: middle; " class="allnum">0</td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; " ></td>
                                        <td style="text-align: center; vertical-align: middle; " ></td>
                                        <td style="text-align: center; vertical-align: middle; "class="alprice">0</td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "class="alltax">0</td>
                                        <td style="text-align: center; vertical-align: middle; "class="price_tax">0</td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                    </tbody>
                                </table>
                            </div>

                    <br>
                    <div class="widget-body no-padding">

                        <div class="bootstrap-table">
                            <div class="commonsearch-table ">
                                <fieldset>
                                    <div class="row">
                                        <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3" style="display: ">
                                            <label for="company" class="control-label col-xs-4">优惠</label>
                                            <div class="col-xs-8">
                                                <input type="text" class="form-control " name="discount" value="{$row.discount}" placeholder="优惠" id="discount" data-index="7" onkeyup="checkInputIntFloat(this);" disabled>
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3" style="display: ">
                                            <label for="c-storehouse_id" class="control-label col-xs-4">优惠说明</label>
                                            <div class="col-xs-8">
                                                <input id="c-discount-explain"   class="form-control " name="discount_explain" type="text" value="{$row.discount_explain}" disabled>
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3" style="display: ">
                                            <label for="company" class="control-label col-xs-4">商品费用</label>
                                            <div class="col-xs-8">
                                                <input  data-rule="required"  class="form-control goods_cost" name="goods_cost" type="text" value="{$goods_price}" disabled>
                                            </div>
                                        </div>
                                        <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                                            <label for="c-storehouse_id" class="control-label col-xs-4">实际费用</label>
                                            <div class="col-xs-8">
                                                <input id="c-actual-cost" data-rule="required"  class="form-control actual_cost" name="actual-cost" type="text" value="{$row.actual_cost}" disabled>
                                                <input  data-rule="required"  class="form-control actual_cost" name="actual_cost" type="text" value="{$row.actual_cost}" style="display: none">
                                            </div>
                                        </div>
                                    </div>
                            </div>

                            </fieldset>
                        </div>
                    </div>
                </div>
                        </div>
                    </div>
                </div>
            </div>

    </div>
</form>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
{include file='common/caifooter' /}
<div class="form-group layer-footer">
    <a class="btn btn-outline-success" href="javascript:printHTML('#add-form')" target="_self" style="margin-left: 20px">打印</a>
    <!--    <a class="btn btn-outline-success  printing" href="###" target="_self" style="margin-left: 20px" >打印</a>-->
</div>
<script>
    function printHTML(page)
    {
        var bodyHTML=window.document.body.innerHTML;
        window.document.body.innerHTML=$(page).html();
        window.print();
        window.document.body.innerHTML=bodyHTML;
    }
</script>

<script>
    var state = 0;
    $('body').on('blue','input',function () {

    })
</script>